package cn.coastalinfo.project.drools.domain;

import cn.coastalinfo.framework.web.domain.TreeEntity;
import cn.coastalinfo.project.drools.enums.ConditionType;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;


/**
 * 规则条件对象 tb_rule_condition
 *
 * @author hadge
 * @date 2024-06-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("tb_rule_condition")
public class RuleCondition extends TreeEntity<RuleCondition> {

    private static final Long serialVersionUID = 1L;

    /**
     *
     */
    @TableId(value = "id"
    )
    private Long id;
    /**
     * 规则id
     */
    @TableField(value = "rule_id")
    private Long ruleId;
    /**
     * 类型，and,or,normal
     */
    @TableField(value = "type")
    private ConditionType type;
    /**
     * 表达式左值类型，variable,input
     */
    @TableField(value = "left_type")
    private String leftType;
    /**
     * 表达式左值id
     */
    @TableField(value = "left_id")
    private Long leftId;
    /**
     * 左值缓存名
     */
    @TableField(value = "left_label")
    private String leftLabel;
    /**
     * 左值缓存名
     */
    @TableField(value = "left_value")
    private String leftValue;
    /**
     * 操作符
     */
    @TableField(value = "operator")
    private String operator;
    /**
     * 表达式右值类型，variable,input
     */
    @TableField(value = "right_type")
    private String rightType;
    /**
     * 右值中文名
     */
    @TableField(value = "right_label")
    private String rightLabel;
    /**
     * 表达式右值id
     */
    @TableField(value = "right_id")
    private Long rightId;
    /**
     * 右值缓存名
     */
    @TableField(value = "right_value")
    private String rightValue;

    @TableField(exist = false)
    private String thenSet;
}
